package com.example.demo2.entity;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

/**
 * Result 实体类
 */
public class Result {
    private int id;
    private String name;
    private String formula;
    private double  result;
    private String content;
    private Date time;

    public Result() {
        // 默认构造函数
    }

    public Result(String name, String formula, float result, String content, Date time) {
        this.name = name;
        this.formula = formula;
        this.result = result;
        this.content = content;
        this.time = time;
    }

    // Getters 和 Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFormula() {
        return formula;
    }

    public void setFormula(String formula) {
        this.formula = formula;
    }

    public double getResult() {
        return result;
    }

    public void setResult(double result) {
        this.result = result;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "Result{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", formula='" + formula + '\'' +
                ", result=" + result +
                ", content='" + content + '\'' +
                ", time=" + time +
                '}';
    }
}
